<?
// handle errors
handle_error($errors);
?>
<!DOCTYPE HTML><html>
<head>
<? echo $h->meta($title, $kwd, $dpn); ?>
<? require_once("lib.php"); ?>
<script src="<?=$ecom?>/js/jquery.validate.js" type="text/javascript"></script>
<script src="<?=$ecom?>/js/jquery.metadata.js" type="text/javascript"></script>
</head>
<body id="">
<? include_once("header.php"); ?>
<div id="wrap">
	<div class="breadcrumb">
		<a href="./"><?=WEB_INDEX_PAGE?></a> &gt; <a href="member.html"><?=WEB_MEMBER_CENTER?></a> &gt; <span><?=$cate_name?></span>
	</div><!--breadcrumb end-->
	<div id="" class="w180 left">
		<? require 'member_menu.php' ?>
	</div><!--. w220-->
		<div id="" class="right w760">
			<div class="">
				<div class="h2news">
					<h2><?=$cate_name?></h2>
				</div>
				<div class="content">
					<div class="">
						<div class="member_title"><strong class="font14px black"><?=WEB_BASIC_INFO?></strong> <span class="red"> * </span><?=WEB_REQUIRED_FIELD?></div>
					<form method="post" class="need_check">
						<? 
						// 签名以过滤非法提交表单
						$key=md5('ecomgear'.date('Ymd'));
						echo $h->hidden('key',$key);
						echo $h->hidden('action','update'); ?>
						<table class="table_profile" width="100%">
							<tr><td width="100" class="tright"><?=WEB_USER_NAME?>: </td><td><?=$info['email']?></td></tr>
							<tr><td class="tright"><span class="error">*</span> <?=WEB_NICKNAME?>: </td><td>
								<input type="text" name="nickname" class="g {validate:{required:true,messages:{required:'<?=WEB_NICKNAME_REQUIRED?>'}}}" maxlength="20" value="<?=$info['nickname']?>" />
								</td></tr>
							<tr><td class="tright"><?=WEB_FIRST_NAME?>: </td><td>
								<input type="text" name="firstname" value="<?=$info['first_name']?>" class="g" maxlength="20" />
								</td></tr>
							<? $nada=''; if($lang_id > 1 && $lang_id < 4) $nada=' class="hide" '; ?>
							<tr <?=$nada?>><td class="tright"><?=WEB_LAST_NAME?>: </td><td>
								<input type="text" name="lastname" value="<?=$info['last_name']?>" class="g" maxlength="20" />
								</td></tr>
							<?
								$check_radio=array(); // 选定一个按钮
								for($i=0;$i<3;$i++){
									$status=''; if($i==$info['gender']) $status=' checked ';
									$check_radio[$i]=$status;
								}
							?>
							<tr><td class="tright"><span class="error">*</span> <?=WEB_GENDER?>: </td><td><input type="radio" name="gender" value="0" id="radio3" <?=$check_radio[0]?> /><label for="radio3"> <?=WEB_SECRET?></label> &nbsp; <input type="radio" name="gender" value="1" id="radio1" <?=$check_radio[1]?> /><label for="radio1"> <?=WEB_MALE?> </label>&nbsp; <input name="gender" type="radio" value="2" id="radio2" <?=$check_radio[2]?> /><label for="radio2"> <?=WEB_FEMALE?> </label></td></tr>
							<tr><td class="tright"><?=WEB_EMAIL?>: </td><td><?=$info['email']?> &nbsp; 
								<? if($info['is_verified']) { ?><span class="icon_ok"><?=WEB_ALREADY_VERIFIED?></span><? } ?>
							</td></tr>
							<tr><td class="tright"><?=WEB_REGISTRATION_TIME?>: </td><td><?=$info['created_time']?></td></tr>
						</table>
						<div class="px20"></div>
						<div class="member_title"><strong class="font14px black"><?=WEB_OTHER_INFO?></strong></div>
						<table class="table_profile" width="100%">
							<tr><td width="100" class="tright"><?=WEB_BIRTHDAY?>: </td><td>
							<? if($info['birthday']!='')
							echo $info['birthday'];
							else { ?>
								<input type="text" class="g  {validate:{date:true,messages:{date:'<?=WEB_INVALID_DATE?>'}}}" name="birthday" maxlength="20" /> <span class="error"><?=WEB_BIRTHDAY_FORMAT?></span>
							<? } ?>
							</td></tr>
							<tr><td class="tright"><?=WEB_MOBILE?>: </td><td><input value="<?=$info['mobile']?>" class="g" type="text" name="mobile" maxlength="20" /></td></tr>
							<tr><td class="tright"><?=WEB_PHONE?>: </td><td><input value="<?=$info['phone']?>" class="g" type="text" name="phone" maxlength="20" /></td></tr>
							<tr><td>&nbsp;</td><td class=""><input type="submit" class="button_blue" value="<?=WEB_SAVE?>" /></td></tr>
						</table>
						<div class="px20"></div>
					</form>
					</div>
				</div>
				<div class="map"></div>
				<div class="clear"></div>
			</div><!--. featured product-->
	</div><!--# featured_and_ad_right-->
		<div class="clear"></div>
	<div class="px20"></div>
	<div class="clear"></div>
</div>
<? include("footer.php"); ?>
<script type="text/javascript">
  $(document).ready(function(){
  	$(".need_check").validate({meta: "validate", onkeyup: false, 
		errorPlacement: function( label, element ) {
			element.parent().append("<br>").append(label);
		}
	
	});
});
</script>
</body>
</html>